The following is valid for both predefined and user defined System Properties.
Object GetSystemProperty(propertyName: string);
Returns the value of a system property
Parameters
Name | Type | Description |
propertyName | String | The name of the property to retrieve. (as it appears in the Project Explorer) |
Return Value – Object
An object that represents the current value of the system property requested
void SetSystemProperty(propertyName: string, value: object);
Sets the value of a system property specified within the first parameter
Parameters
Name | Type | Description |
propertyName | String | The name of the property to set (as it appears in the Project Explorer) |
value | Object | The value to set the property to |
Return Value - void.
Note – Only new system defined system properties can be set, calling this function with a pre-defined system property name has no effect.
void SubscribeToSystemPropertyChange(propertyName: string, callbackName: string);
Subscribes to event callback for changes of a component System defined property
Parameters
Name | Type | Description |
PropertyName | String | The name of the property to subscribe to |
callbackName | String | The name of the callback function |
Return Value - void.
Callback definition: void xxxxxxxxxxxxx(property, value)
Name | Type | Description |
property | object | The name of the property that changed. |
value | object | The new value of the property |
void UnSubscribeToSystemPropertyChange(property: string);
Unsubscribe to an event callback for changes of a component system defined property
Parameters
Name | Type | Description |
property | String | The name of the property to unsubscribe to |
Return Value - void.
Example: Assumes a new System property called 'MySystemProperty' has been created.
SetSystemProperty("MySystemProperty",42); SubscribeToSystemPropertyChange("MySystemProperty","OnSystemPropertyChanged"); ... function OnSystemPropertyChanged(property, value) { LogDebug("Property " + property + " value changed to "+ value); var newvalue = GetSystemProperty("MySystemProperty"); }